1. Field of the Invention
The present invention relates a numerical control device and, in particular, a numerical control device performing a high speed binary operation and a high speed cyclic machining.
2. Description of the Prior Art
In a numerical control device, a movement command is interpolated or distributed to each axis movement command for each predetermined period based on an NC program describing the movement command by a straight line, a circular arc line or the like to thereby move each axis. However, in the case of a high speed machining or the like, as a program analysis and an interpolation processing do not meet a machining speed, a numerical control device provided with the functions of a high speed binary operation and a high speed cyclic operation (hereinafter collectively referred to as a binary operation) is employed, wherein the movement of each axis for each predetermined distribution period is stored and the stored movement for each distribution period is read out and outputted to each axis every distribution period, so that each axis is driven and controlled to machine a work.
In this binary operation, it is possible to synchronize the complex motions of a plurality of axes with each other at high speeds because any distribution movement can be commanded to each of the plurality of axes.
Also, in the case where a machine is suddenly caused to be stopped when an abnormality occurs, a numerical control device which performs a retracting motion for retracting a tool from a work to be machined is publicly known in a usual NC machining program.
In the above mentioned binary operation function, an acceleration/deceleration control is also performed based on the movement for each distribution period stored in a memory unit and, therefore, if a machining is normally finished, there is no problem. However, in the case where a machine needs to be suddenly stopped because of occurrence of abnormalities or the like, unlike the normal machining, there is no accumulation for acceleration or deceleration and, therefore, the reset of the binary operation suddenly will stop the supply of the distribution movement and produces an over error or an excess current to give a servo alarm. That is, if the supply of the distribution movement is stopped while a movable part of the machine is moving at high speeds, the movable part of the machine is going to stop but can not stop immediately because of inertia and the like. For this reason, the movement is fed back to increase errors in positioning and the increased errors will produce an excess current and give a servo alarm. If the servo alarm is given, a motion of retracting the tool can not be performed. Further, since the state of synchronization can not be kept, the tool machining the work is held engaged with the work, which sometimes results in breaking the tool and the work.
In a high speed cyclic machining, a function referred to as a retraction in the high speed cyclic machining is publicly known and used. This retraction motion is to retract a tool axis machining a work to a safe position by adding a retracting movement to a distribution movement when an abnormality occurs. However, since the retracting movement is an incremental amount, a position (retraction position) where the retracting motion is finished is different depending on a position where the retracting motion (or retreat) is started. Therefore, this function of retraction has a drawback that the tool axis can not be retracted to a determined position of an absolute coordinate system.
In order to retract the tool axis machining the work to the determined position of the absolute coordinate system during the binary operation, the following method can be thought: first, a movement is calculated from the distance between the position of the tool when an external signal or an alarm occurs and the absolute position where the tool is to be retracted, and then, the supply of distribution movement of the binary operation is stopped and the tool axis is retracted by the calculated movement, whereby the tool axis can be retracted to the determined position of the absolute coordinate system during the binary operation. However, in this case, the supply of the distribution movement of the binary operation is stopped and hence the synchronous motion between axes in the binary operation which has been kept can not be kept any more, which produces a possibility in some machines that the axes come into collision with each other.
It is the object of the present invention to provide a numerical control device enabling a retracting motion in a binary operation and capable of retracting the retracting axis of a tool or the like to a set position in an absolute coordinate system.
In order to accomplish the above object, in the first embodiment of the present invention, a numerical control device controls movement of each axis of a machine synchronously with each other to repeatedly control a cyclic motion by storing a movement of each axis of the machine for each predetermined period in a memory unit and by supplying the movement stored in the memory unit to each axis every predetermined period from a numerical control section. The numerical control device includes a retracting unit which gives an amount of retraction to a specified axis as a retracting axis, from among the axes synchronously controlled so that the retraction is added to a synchronous control of the retracting axis and stops the supply of the movement stored in the memory unit, in the event of an emergency stop due to the occurrence of an external signal or an alarm. The retracting unit stops the supply of the movement at the predetermined point of the cyclic motion.
Preferably, the amount of retraction is previously set in the retracting unit.
In the second embodiment of the present invention, a numerical control device controls movement of each axis of a machine synchronously with each other to repeatedly control a cyclic motion by storing a movement of each axis of the machine for each predetermined period in a memory unit and by supplying the movement stored in the memory unit to each axis every predetermined period from a numerical control section. And the numerical control device comprises a retracting unit which determines a motion region of a cyclic motion at the time of occurrence of an external signal or an alarm, moves a axis which is specified as a retracting axis from among the axes synchronously controlled in a specified direction by the set amount of retraction and stops the supply of the movement stored in the memory unit, in the event of an emergency stop due to occurrence of an external signal or an alarm. The retracting unit stops the supply of the movement at a predetermined point of the cyclic motion corresponding to the determined motion region.
Preferably, the retracting unit is set for each motion region.
Preferably, the retracting unit adds the amount of retraction to the movement for the cyclic motion of the retracting axis extending over a predetermined number of periods, in the event of an emergency stop due to occurrence of an external signal or an alarm.
Preferably, the point where the retracting unit stops the supply of the movement is determined based on the rotational position of another axesynchronously controlled together with the retracting axis.
According to the present invention, in the event of an emergency stop due to occurrence of an abnormality during a binary operation performing a cyclic motion, a retracting axis can be retracted to a predetermined position in an absolute coordinate system and hence the retracting axis can be retracted to a set position where a tool or the like mounted on the retracting axis does not interfere with a work and any obstacles.